#ifndef _CAN_APP_H_
#define _CAN_APP_H_

#pragma pack(1)
struct can_ext_flag_part {
    volatile unsigned int rsvd : 1;
    volatile unsigned int rtr : 1;
    volatile unsigned int ide : 1;
    volatile unsigned int cmd : 12;
    volatile unsigned int dst : 8;
    volatile unsigned int src : 8;
    volatile unsigned int rsvd_1 : 1;
};

union can_ext_flag_all {
    unsigned int             all;
    struct can_ext_flag_part part;
};

struct adaptor_parm_summary {
    unsigned char can_id;
};

struct can_cmd_id_part {
    unsigned int cmd : 12;
    unsigned int dst : 8;
    unsigned int src : 8;
    unsigned int rsvd : 4;
};

union can_cmd_id_all {
    unsigned int           all;
    struct can_cmd_id_part part;
};

struct response_packet {
    unsigned char cmd_flag_0;
    unsigned char cmd_flag_1;
    unsigned char can_addr;
    unsigned char rsvd[5];
};

#pragma pack()

void operate_data_report(void);

extern struct paramter_report_packet parm_report_data;

#endif
